package com.xiaoyang.controller;

import com.xiaoyang.domain.Order;
import com.xiaoyang.feign.UserOrderFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

/**
 * @auther XiaoYang
 * @DATE 2023/5/5-17:41
 */
@RestController
@Slf4j
public class OrderController implements UserOrderFeign {


    @Override
    public Order getOrderByUserId(Integer userId) {
        log.info("用户id:{}",userId);

        Order order = Order.builder()
                .name("西湖牛肉羹")
                .price(38D)
                .orderId(1)
                .build();

        return order;
    }
}
